package com.boot.lettuce;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: lkz
 * @Title: TestController
 * @Description: TODO
 * @Date: 2023/9/14 15:47
 */
@RestController
public class TestController {


    @Autowired
    RedisTemplate redisTemplate;

    @GetMapping("test")
    public void test(){
        redisTemplate.opsForValue().set("k1","test汉字");
        String o = (String)redisTemplate.opsForValue().get("k1");
        System.out.println(o);
    }

}
